package com.huiyuanai.dao;

import lombok.Data;

import java.util.Date;

/**
 * @Author: liwan
 * @Description:
 * @Date: create in 2021/10/3
 */
@Data
public class User {
    private int id;
    private String userCode;
    private String userName;
    private String userPassword;
    private int gender;
    private Date birthday;
    private String phone;
    private String address;
    private int userRole;
    private int createdBy;
    private Date creationDate;
    private int modifyBy;
    private Date modifyDate;

    private String userRoleName;
    private Integer age;

    public Integer getAge() {
        Date date = new Date();
        return date.getYear() - this.birthday.getYear();
    }

}
